-- Neovim Configuration Module: Universal Keymap --
local default_opts = {
	silent = true,
}

local keymap = {
	--- Jumping ---
	{
		'', '<C-<>',
		'<C-o>',
		{ desc = 'Jump backward' },
	},
	{
		'', '<C->>',
		'<C-i>',
		{ desc = 'Jump forward' },
	},

	--- Editing ---
	{
		{ '',           'i' }, '<C-S-z>',
		vim.cmd.undo,
		{ desc = 'Undo' },
	},

	{
		{ '',           'i' }, '<C-S-y>',
		vim.cmd.redo,
		{ desc = 'Redo' },
	},

	{
		'v', '<C-S-x>',
		'"+d',
		{ desc = 'Cut to clipboard' },
	},

	{
		'v', '<C-S-c>',
		'"+y',
		{ desc = 'Copy to clipboard' },
	},

	{
		'', '<C-S-v>',
		'"+P',
		{ desc = 'Paste from clipboard' },
	},

	{
		'i', '<C-S-v>',
		'<C-o>"+P',
		{ desc = 'Paste from clipboard' },
	},

	{
		{ '',                    'i' }, '<C-S-s>',
		vim.cmd.write,
		{ desc = 'Write to file' },
	},
}

BindKeys(keymap, default_opts)
